<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{ backdrop: 'static', keyboard: !saving }">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form *ngIf="active" #userForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
        <div class="modal-header">
          <h4 class="modal-title">
            <span *ngIf="ItemDetail.id">编辑字典信息</span>
            <span *ngIf="!ItemDetail.id">新增字典信息</span>
          </h4>
          <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
        
              <div class="row">
                <div class="form-group col-md-12">
                  <label for="ItemId">分类名称 *</label>
                  <p-dropdown [filter]="true" filterBy="label"
                  name = "selectedItem"
                  [options]="itemAyy" 
                  [(ngModel)]="selectedItem"  
                  [style]="{ width: '760px' }" ></p-dropdown> 
                </div>
              </div>
              <div class="row">
                <div class="form-group col-md-12">
                  <label for="ItemCode">编号 *</label>
                  <input id="ItemCode" #ItemCodeInput="ngModel" type="text" name="ItemCode" class="form-control"
                    [(ngModel)]="ItemDetail.itemCode" required maxlength="256" />
                  <validation-messages [formCtrl]="ItemCodeInput"></validation-messages>
                </div>
              </div>
              <div class="row">
                <div class="form-group col-md-12">
                  <label for="ItemName">名称 *</label>
                  <input id="ItemName" #ItemNameInput="ngModel" type="text" name="ItemName" class="form-control"
                    [(ngModel)]="ItemDetail.itemName" required maxlength="256" />
                  <validation-messages [formCtrl]="ItemNameInput"></validation-messages>
                </div>
              </div>
              <div class="row">
                <div class="form-group col-md-12">
                  <label for="ItemValue">值 *</label>
                  <input id="ItemValue" #ItemValueInput="ngModel" type="text" name="ItemValue" class="form-control"
                    [(ngModel)]="ItemDetail.itemValue" required maxlength="256" />
                  <validation-messages [formCtrl]="ItemValueInput"></validation-messages>
                </div>
              </div>
              <div class="row">
                <div class="form-group col-md-12">
                  <label for="Description">备注</label>
                  <input id="Description" #DescriptionInput="ngModel" type="text" name="Description"
                    class="form-control" [(ngModel)]="ItemDetail.description" maxlength="32" />
                  <validation-messages [formCtrl]="DescriptionInput"></validation-messages>
                </div>
              </div>
  
        </div>
        <div class="modal-footer">
          <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">
            取消
          </button>
          <button type="submit" class="btn btn-primary" [disabled]="!userForm.form.valid" [buttonBusy]="saving"
            [busyText]="l('SavingWithThreeDot')">
            <i class="fa fa-save"></i> <span>保存</span>
          </button>
        </div>
      </form>
    </div>
  </div>
</div>